<template>
  <!--  <div style="width: 1200px;height: 500px;margin: 0 auto;">
      <h1>测试</h1>
      <div style="display: flex;flex-wrap: wrap">
        <h2>行业：</h2>
        <div v-for="item in IndustryList" @click="selectIndustry(item)" style="margin-right: 20px">
          <a href="javascript:void(0)">
            {{ item.detailName }}
          </a>
        </div>
      </div>
      <el-divider/>
      <div v-if="workInfo.length!=0" style="display: flex;flex-wrap: wrap">
        <h2>工种：</h2>
        <div v-for="item in workInfo"  @click="selectWork(item)" style="margin-right: 20px">
          <a href="javascript:void(0)">
            {{ item.detailName }}
          </a>
        </div>

        <el-divider/>

      </div>
      <div v-for="item in WorkList" :key="item.id" @click="workSelectedIndustry(item)" style="margin-right: 20px">
        <a href="javascript:void(0)">
          {{ item.detailName }}
        </a>
      </div>
      <el-divider/>
      <div v-if="selectedwork.length!=0" style="display: flex;flex-wrap: wrap">
        <h2>已选</h2>
        <div v-for="(item,i) in selectedwork" :key="i" @click="locadelete(i)">
          {{ item.detailName }}
        </div>
      </div>
    </div>-->

  <div>
<!--    <el-upload
        :action="this.BASE_URL+'/v1/upload'"
        name="file"
        :limit="1"
        :on-success="handleSuccess"
        :on-preview="handlePictureCardPreview"
        :on-remove="handleRemove">
      <i class="el-icon-plus"></i>
    </el-upload>
    <el-dialog :visible.sync="dialogVisible">
      <img width="100%"  :src="dialogImageUrl" alt="">
    </el-dialog>

    <el-avatar :src="this.BASE_URL+user.imgUrl" ></el-avatar>-->

<!--
    <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>

    <el-dialog
        title="是否定位到当前位置"
        style="text-align: left"
        :visible.sync="dialogVisible"
        width="500px"
        :before-close="handleClose">
      <baidu-map class="map" center="北京">
        <bm-geolocation anchor="BMAP_ANCHOR_BOTTOM_RIGHT" :showAddressBar="true" :autoLocation="true"></bm-geolocation>
      </baidu-map>
    <el-button @click="dialogVisible3 = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible3 = false">确 定</el-button>
    </el-dialog>
-->

    <div>
      <el-button @click="authenButton">点击</el-button>
      <p>{{this.responseInfo}}</p>
    </div>


  </div>
</template>

<script>

export default {

  name: "TextView",

  data() {
    return {
      dialogVisible:false,
      Experience:{textareas: "zhangsan", startTime: "2023-02-10", endTime: "2023-02-18"},
      releSalaryselected:[],
      center: {lng: 0, lat: 0},
      zoom: 3,
      responseInfo:"",
      user:'',
    }
  },
  methods: {
    handler ({BMap, map}) {
      console.log(BMap, map)
      this.center.lng = 116.404
      this.center.lat = 39.915
      this.zoom = 15
    },
    authenButton(){
      let jwt=this.user.token;
      let url='http://localhost:9800/test/authenticated';
      console.log(jwt)
      this.axios
          .create({
            'headers':{
              'Authorization':jwt
            }
          })
          .get(url).then((response)=>{
          this.responseInfo=response.data;
      })

    }
  },
  mounted() {
    let jsonUser=localStorage.getItem("user");
    this.user=JSON.parse(jsonUser);
    console.log(this.user)
  }

}
</script>
<style scoped>
.map {
  width: 100%;
  height: 300px;
}
</style>